package org.example.contract.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 合同管理对象 b_contract
 *
 * @author 小孟微信：xiaomengcode
 * @date 2024-04-11
 */
public class Contract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long  ownerDeptId;

    private Long  buyDeptId;

    //
    private String roleFlag;


    /** 合同ID */
    private Long contractId;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractCode;

    /** 合同类型 */
    @Excel(name = "合同类型")
    private String contractType;

    /** 合同名称 */
    @Excel(name = "合同名称")
    private String name;

    /** 甲方名称 */
    @Excel(name = "甲方名称")
    private String owner;

    /** 甲方联系人 */
    @Excel(name = "甲方联系人")
    private String ownerName;

    /** 甲方地址 */
    @Excel(name = "甲方地址")
    private String ownerAddress;

    /** 甲方地址 */
    @Excel(name = "甲方地址")
    private String ownerPhone;

    /** 乙方名称 */
    @Excel(name = "乙方名称")
    private String buy;

    /** 乙方联系人 */
    @Excel(name = "乙方联系人")
    private String buyName;

    /** 乙方地址 */
    @Excel(name = "乙方地址")
    private String buyAddress;

    /** 乙方电话 */
    @Excel(name = "乙方电话")
    private String buyPhone;

    /** 合同内容 */
    @Excel(name = "合同内容")
    private String content;

    /** 总数 */
    @Excel(name = "总数")
    private Integer totalNum;

    /** 使用总数 */
    @Excel(name = "使用总数")
    private Integer useNum;

    /** 合同金额 */
    @Excel(name = "合同金额")
    private BigDecimal totalMoney;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payTotalMoney;

    private BigDecimal orderMoney;

    private BigDecimal useMoney;

    /** 付款方式 */
    @Excel(name = "付款方式")
    private String payType;

    /** 有效开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 有效结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public String getRoleFlag() {
        return roleFlag;
    }

    public void setRoleFlag(String roleFlag) {
        this.roleFlag = roleFlag;
    }

    public Long getOwnerDeptId() {
        return ownerDeptId;
    }

    public void setOwnerDeptId(Long ownerDeptId) {
        this.ownerDeptId = ownerDeptId;
    }

    public Long getBuyDeptId() {
        return buyDeptId;
    }

    public void setBuyDeptId(Long buyDeptId) {
        this.buyDeptId = buyDeptId;
    }

    public BigDecimal getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(BigDecimal orderMoney) {
        this.orderMoney = orderMoney;
    }

    public BigDecimal getUseMoney() {
        return useMoney;
    }

    public void setUseMoney(BigDecimal useMoney) {
        this.useMoney = useMoney;
    }

    public void setContractId(Long contractId)
    {
        this.contractId = contractId;
    }

    public Long getContractId()
    {
        return contractId;
    }
    public void setContractCode(String contractCode)
    {
        this.contractCode = contractCode;
    }

    public String getContractCode()
    {
        return contractCode;
    }
    public void setContractType(String contractType)
    {
        this.contractType = contractType;
    }

    public String getContractType()
    {
        return contractType;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setOwner(String owner)
    {
        this.owner = owner;
    }

    public String getOwner()
    {
        return owner;
    }
    public void setOwnerName(String ownerName)
    {
        this.ownerName = ownerName;
    }

    public String getOwnerName()
    {
        return ownerName;
    }
    public void setOwnerAddress(String ownerAddress)
    {
        this.ownerAddress = ownerAddress;
    }

    public String getOwnerAddress()
    {
        return ownerAddress;
    }
    public void setOwnerPhone(String ownerPhone)
    {
        this.ownerPhone = ownerPhone;
    }

    public String getOwnerPhone()
    {
        return ownerPhone;
    }
    public void setBuy(String buy)
    {
        this.buy = buy;
    }

    public String getBuy()
    {
        return buy;
    }
    public void setBuyName(String buyName)
    {
        this.buyName = buyName;
    }

    public String getBuyName()
    {
        return buyName;
    }
    public void setBuyAddress(String buyAddress)
    {
        this.buyAddress = buyAddress;
    }

    public String getBuyAddress()
    {
        return buyAddress;
    }
    public void setBuyPhone(String buyPhone)
    {
        this.buyPhone = buyPhone;
    }

    public String getBuyPhone()
    {
        return buyPhone;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setTotalNum(Integer totalNum)
    {
        this.totalNum = totalNum;
    }

    public Integer getTotalNum()
    {
        return totalNum;
    }
    public void setUseNum(Integer useNum)
    {
        this.useNum = useNum;
    }

    public Integer getUseNum()
    {
        return useNum;
    }
    public void setTotalMoney(BigDecimal totalMoney)
    {
        this.totalMoney = totalMoney;
    }

    public BigDecimal getTotalMoney()
    {
        return totalMoney;
    }

    public BigDecimal getPayTotalMoney() {
        return payTotalMoney;
    }

    public void setPayTotalMoney(BigDecimal payTotalMoney) {
        this.payTotalMoney = payTotalMoney;
    }

    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType()
    {
        return payType;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("contractId", getContractId())
            .append("contractCode", getContractCode())
            .append("contractType", getContractType())
            .append("name", getName())
            .append("owner", getOwner())
            .append("ownerName", getOwnerName())
            .append("ownerAddress", getOwnerAddress())
            .append("ownerPhone", getOwnerPhone())
            .append("buy", getBuy())
            .append("buyName", getBuyName())
            .append("buyAddress", getBuyAddress())
            .append("buyPhone", getBuyPhone())
            .append("content", getContent())
            .append("totalNum", getTotalNum())
            .append("useNum", getUseNum())
            .append("totalMoney", getTotalMoney())
            .append("payTotalMoney", getPayTotalMoney())
            .append("payType", getPayType())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .toString();
    }
}
